import request from "@/utils/request";
import uploadFileRequest from "@/utils/upload_file_request";

// 发送短信验证码
export const sendVerificationCode = (options: any) => {
    return request({
        method: "POST",
        url: "/api/send-verification-code/",
        data: options
    })
}
// 上传API
export const uploadFiles = (options: any) => {
    return uploadFileRequest({
        method: "POST",
        url: "/api//common/uploadFile",
        data: options
    })
}


// 登录
export const login = (options: any) => {
    return request({
        method: "POST",
        url: "/api/users/login",
        data: options
    })
}

// 获取用户列表
export const getUserList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/users/get-userList",
        data: options
    })
}
// 获取用户信息
export const getUserInfo = (options: any) => {
    return request({
        method: "GET",
        url: "/api//users/get-userInfo",
        data: options
    })
}


// 修改用户信息
export const updateUserInfo = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/users/updata-userInfo",
        data: options
    })
}

// 删除用户
export const deleteUser = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/delete-user/",
        data: options
    })
}
// 获取字典列表

export const getDictionaryList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/dictionary/get-dictionary",
        data: options
    })
}
// 新增字典
export const addDictionary = (options: any) => {
    return request({
        method: "POST",
        url: "/api/dictionary/add-dictionary",
        data: options
    })
}

// 删除字典
export const deleteDictionary = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/dictionary/delete-dictionary",
        data: options
    })
}

// 编辑字典
export const editDictionary = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/dictionary/update-dictionary",
        data: options
    })
}


// 获取分类列表

export const getClassificationList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/classify/get-classify",
        data: options
    })
}
// 新增分类
export const addClassification = (options: any) => {
    return request({
        method: "POST",
        url: "/api/classify/add-classify",
        data: options
    })
}

// 删除分类
export const deleteClassification = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/classify/delete-classify",
        data: options
    })
}

// 编辑分类
export const editClassification = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/classify/update-classify",
        data: options
    })
}

// 获取资源列表

export const getResourceList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/resource/get-resource",
        data: options
    })
}
// 新增资源
export const addResource = (options: any) => {
    return request({
        method: "POST",
        url: "/api/resource/add-resource",
        data: options
    })
}

// 删除资源
export const deleteResource = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/resource/delete-resource",
        data: options
    })
}

// 编辑资源
export const editResource = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/resource/update-resource",
        data: options
    })
}

// 获取文章博客列表

export const getArticleBlogList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/get-article-blog-list/",
        data: options
    })
}
// 新增文章博客
export const addArticleBlog = (options: any) => {
    return request({
        method: "POST",
        url: "/api/add-article-blog/",
        data: options
    })
}

// 删除文章博客
export const deleteArticleBlog = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/delete-article-blog/",
        data: options
    })
}

// 编辑文章博客
export const editArticleBlog = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/edit-article-blog/",
        data: options
    })
}

// 获取站点收录列表

export const getSiteInclusionList = (options: any) => {
    return request({
        method: "GET",
        url: "/api/siteInclusion/get-siteInclusion",
        data: options
    })
}
// 新增站点收录
export const addSiteInclusion = (options: any) => {
    return request({
        method: "POST",
        url: "/api/siteInclusion/add-siteInclusion",
        data: options
    })
}

// 删除站点收录
export const deleteSiteInclusion = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/siteInclusion/delete-siteInclusion",
        data: options
    })
}

// 编辑站点收录
export const editSiteInclusion = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/siteInclusion/update-siteInclusion",
        data: options
    })
}

// 获取广告列表
export const getAdList = (options: any) => {
  return request({
      method: "GET",
      url: "/api/advertisement/get-advertisement",
      data: options
  })
}

// 新增广告
export const addAd = (options: any) => {
  return request({
      method: "POST",
      url: "/api/advertisement/add-advertisement",
      data: options
  })
}
export const editAd = (options: any) => {
  return request({
      method: "PUT",
      url: "/api/advertisement/update-advertisement",
      data: options
  })
}
export const deleteAd = (options: any) => {
  return request({
      method: "DELETE",
      url: "/api/advertisement/delete-advertisement",
      data: options
  })
}
